# coding: utf-8

import sys
from PySide6.QtWidgets import QApplication, QWidget
from formHello import Ui_Form


class QmyWidget(QWidget, Ui_Form):
    def __init__(self, parent=None):
        super().__init__(parent)  # 继承父类init，创建 QWidgett 窗体
        self.setupUi(self)  # self是widget窗体，作为参数传入
        self.alertText = "alert"  # 声明1个变量
        self.label.setText(self.alertText)  # 使用变量


if __name__ == '__main__':
    app = QApplication(sys.argv)
    widget = QmyWidget()
    widget.show()
    sys.exit(app.exec())
